# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=kiwix-lib
_pkgname=libkiwix
pkgver=11.0.0
pkgrel=0
pkgdesc="Common code base for all Kiwix ports"
url="https://github.com/kiwix/libkiwix"
license="GPL-3.0-or-later"
arch="all"
depends="aria2"
makedepends="
	curl-dev
	gtest-dev
	icu-data-full
	libmicrohttpd-dev
	libzim-dev
	meson
	mustache
	pugixml-dev
	python3
	samurai
	xapian-core-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/kiwix/libkiwix/archive/$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-doc"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	meson . build --prefix /usr
	ninja -C build
}

check() {
	ninja -C build meson-test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

sha512sums="
2f9f23011e18e7f7f753a9e8399f423a98c613abd3df03026b126d71510f47b90ff4986eb91cbd25f52a1f079753ad5e127d4be135edfbd3e4155798bfdf5ae5  kiwix-lib-11.0.0.tar.gz
"
